package com.woniu.custom.controller;

import com.woniu.common.utils.PageParam;
import com.woniu.common.utils.ResponseData;
import com.woniu.custom.service.ChatService;
import org.krysalis.barcode4j.tools.Length;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/chat")
public class ChatController {

    @Autowired
    private ChatService chatService;


    @PostMapping("/queryHuiHua")
    public ResponseData<?> queryHuiHua(@RequestBody PageParam<?> param){
        return chatService.queryHuiHua(param);
    }
    @PostMapping("/queryChat")
    public ResponseData<?> queryChat(@RequestBody String id){
        String substring = id.substring(0, id.length() - 1);
        return chatService.queryChat(Long.valueOf(substring));
    }
    @GetMapping("/infoNumber")
    public ResponseData<?> infoNumber(){
        return chatService.infoNumber();
    }

    @GetMapping("/QueryHuihuaList")
    List<Integer> QueryHuihuaList(){
        return chatService.QueryHuihuaList();
    }

    @GetMapping("/queryAckType")
    public ResponseData<?> queryAckType(){
        return chatService.queryAckType();
    }

}
